﻿<%@ Control Language="VB" AutoEventWireup="false" CodeFile="DateSelectorUnclocked.ascx.vb" Inherits="UserControls_DateSelectorUnclocked" %>
<link rel="stylesheet" href="../Scripts/popcalendar.css">
<link rel="stylesheet" href="../Scripts/Style.css">
<script language="JavaScript" src="../Scripts/popcalendar.js"></script>
<TABLE id="tbl_control" cellSpacing="0" cellPadding="0" border="0" runat="server">
	<TR>		
		<TD align="center"><asp:textbox id="txt_Date" runat="server" Columns="8" BorderStyle="Groove" CssClass="textbox"></asp:textbox></TD>
		<TD><asp:image id="imgCalendar" runat="server" ImageUrl="../Images/calendar.gif"></asp:image></TD>
		<td>(dd/mm/yyyy)</td>
        <TD align="right"><asp:label id="lblDate" Font-Bold="true" runat="server"></asp:label></TD>
		<td>
			<asp:CustomValidator id="validateDate" runat="server" ClientValidationFunction="DateValidate" ErrorMessage="Invalid Date!"
				ControlToValidate="txt_Date" Display="Dynamic" ValidateEmptyText="True" Visible="False"></asp:CustomValidator>
		</td>
	</TR>
</TABLE>
<script language="javascript" type="text/javascript">
   function DateValidate(source, arguments)
   {
       if (isDate(arguments.Value)) 
         arguments.IsValid=true         

      else
         arguments.IsValid=false     
   } 

</script>
